<?php session_start(); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
	<meta charset="utf-8">
    <title>Task Page</title>
<?php echo link_tag(my_url().'skin.css'); ?>
<script type="text/javascript" src="<?php echo my_url(); ?>js/1.js"></script>
<script type="text/javascript" src="../js/1.js"></script>
<script src="<?php echo my_url(); ?>js/AC_RunActiveContent.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
 var BaseURL='<?php echo base_url(); ?>';


function confirmDelete(dv_co_n_id){
	
	var x= window.confirm("Are you sure to delete this item?");
	if(x){
		window.location.href = BaseURL + "task/delete_task/" + dv_co_n_id;
	}	
}

</script>

<link rel="stylesheet" href="../skin.css" type="text/css" media="screen" /><meta name="author" content="Jaypee Mahilum" />
<link rel="stylesheet" href="style.css" type="text/css" media="screen" />
<link href="skin.css" rel="stylesheet" type="text/css" />
</head>

<?php
//echo $_SESSION['administrator_log']."============";
if(!isset($_SESSION['administrator_log']))
{
		echo"Log in first to access this page<html><title>WARNING</title><body><br><a href='".base_url()."administrator' />click here to log in.</a></body></html>";
}
else
{
?>
<body >

	<div class="BodyCover">
	
 		<div class="ParentContent">
	        <?php require("admin_menu.php"); ?>
			<div class="MenuTab">
    			<div class="MenuBelow"><img src="<?php echo my_url();?>images/below-menu.gif"></div>        
             </div>

			<br /><br />	
			<div class="module-index1">
		  		<div align="right"><a href="<?php echo base_url()?>admin/logout" style="color:#FF0000;">logout</a></div><br/>
  	                <p class=""><?php if (isset($recordflag)) {echo $recordflag;}?><p>
                
		 <a href="<?php echo base_url() . "task/add_task/" ?>" >
         	<img src=" <?php echo my_url() ."images/icons/action_add.gif" ?>" style='border:none'/> Add New Data
         </a>
		 <br />
            <form action="<?php echo base_url(); ?>task/SearchTaskFromTo" method="post">
				<fieldset>
					<label><b>Search Task by From/To:</b></label>
					<input type="text" name="search" id="search" value="" size="10" />
					<input type="submit" value="Search" id="Search" />
				</fieldset>
		    </form>
          <br />	
		  
                <div style='overflow:scroll;width:940px;height:400px;border:1pt solid #000;'>
                <table class='Grid' width='450px' border='1'>
                  <tr>
                        <th >View</th>
                        <th >Edit</th>
                        <th  nowrap="nowrap" width='120'>Title</th>
                        
                        <th  nowrap="nowrap" width='120'>Task From</th>
                        <th nowrap="nowrap" width='120'>Task To</th>
                        <th nowrap="nowrap" width='120'>Date</th>
                        <th nowrap="nowrap" width='120'>Completed Date</th>

                  </tr>
<?php
        		  $_rowClass = 'tr_odd';
                foreach($list_tasks as $row)
                {
					$title = $row->title;
					$t_from = $row->t_from;
					$t_to = $row->t_to;
					$date = $row->date;

					$c_date = $row->c_date;
                 
?>					
					<tr class="<?php echo $_rowClass ?>"  <?php echo GetTrEffects() ?> >
                        <td width='5'>
                                <a href="<?php echo base_url() . "task/view_task/". $row->task_id?>" >
                                <img src="<?php echo my_url() . "images/icons/view.gif" ?>" style='border:none'/></a>
						</td>
                        <td width='5'>
                        	<a href="<?php echo base_url() . "task/edit_task/" . $row->task_id ?>">
                            	<img src="<?php echo my_url() . "images/icons/edit.gif" ?>" style='border:none' />
                             </a>
						</td>
                        <td nowrap="nowrap"><?php echo $title?></td>
                        <td nowrap="nowrap"><?php echo $t_from?></td>
                        <td nowrap="nowrap"><?php echo $t_to?></td>
                        <td nowrap="nowrap"><?php echo $date?></td>

                        <td nowrap="nowrap"><?php echo $c_date?></td>
                  </tr>
<?php                  
				  if($_rowClass=="tr_odd") $_rowClass="tr_even"; else $_rowClass="tr_odd";     
                 }
?>
                 </table></div> 
       
    		<br>

            <div class="BodyContent">
            </div>	
			    		
		    <div class="Footer1">	
                <div class="Footer">Copyright &copy; 2011. All Rights Reserved <br><br>
                 <a href="http://webmartis.com"> <img src="<?php echo my_url();?>images/wmlink.png"></a>
                 
                </div>                
            </div> <!---end of Footer1 ---->        
            
		</div><!---end of ParentContent ---->
    </div> <!---end of BodyCover ---->
 
</body>
<?php } ?>
</html>

